#! /usr/bin/env python
# -*- coding: utf-8 -*-

# Copyright (c) Huoty, All rights reserved
# Author: Huoty <sudohuoty@163.com>
# CreateTime: 2022-05-24 17:09:13

def stringify(obj):
    if isinstance(obj, six.string_types):
        return obj
    elif isinstance(obj, datetime.date):
        return str(obj)
    elif isinstance(obj, datetime.datetime):
        return obj.strftime('%Y-%m-%d %H:%M:%S')
    elif isinstance(obj, (tuple, list, set)):
        return ",".join(obj)
    else:
        return str(obj)
